home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ShareWare OnLine 2
/
ShareWare OnLine Volume 2 (CMS Software)(1993).iso
/
games2
/
rotise12.zip
/
BB_PDB.H
< prev
next >
Wrap
C/C++ Source or Header
|
1992-04-03
|
3KB
|
106 lines
/* bb_pdb.h -- Definitions for interfacing to player database
M. Mallett April 1990
*/
#ifndef H_BB_PDB /* Allow multiple inclusions */
#define H_BB_PDB
/* Bits representing positions */
#define POS_P 0x0001 /* Pitcher */
#define POS_C 0x0002 /* Catcher */
#define POS_1B 0x0004 /* First */
#define POS_2B 0x0008 /* Second */
#define POS_3B 0x0010 /* Third */
#define POS_SS 0x0020 /* Short */
#define POS_OF 0x0040 /* Outfield */
#define POS_DH 0x0080 /* DH */
/*
*//* Structures */
/* Batter stat structure used in player stat interface. */
typedef
struct {
WORD bs_atbat; /* # of atbats */
WORD bs_hits; /* Hits */
WORD bs_1b; /* Singles */
UBYTE bs_2b; /* Doubles */
UBYTE bs_3b; /* Triples */
UBYTE bs_hr; /* Home Runs */
UBYTE bs_bb; /* Walks */
UBYTE bs_hpb; /* Hit by pitch */
UBYTE bs_rbi; /* Runs batted in */
UBYTE bs_sb; /* Stolen bases */
UBYTE bs_cs; /* Caught stealing */
} PDB_BATTER;
/* Pitcher stats used in player stat interface */
typedef
struct {
WORD ps_outs; /* Outs (innings * 3) */
WORD ps_er; /* Earned runs */
WORD ps_bb; /* Walks */
WORD ps_hits; /* Hits */
UBYTE ps_won; /* Wins */
UBYTE ps_lost; /* Losses */
UBYTE ps_saved; /* Saves */
} PDB_PITCHER;
/* To total batters and/or pitchers, use these (note the extra big WORD entries */
typedef
struct {
WORD bs_atbat; /* # of atbats */
WORD bs_hits; /* Hits */
WORD bs_1b; /* Singles */
WORD bs_2b; /* Doubles */
WORD bs_3b; /* Triples */
WORD bs_hr; /* Home Runs */
WORD bs_bb; /* Walks */
WORD bs_hpb; /* Hit by pitch */
WORD bs_rbi; /* Runs batted in */
WORD bs_sb; /* Stolen bases */
WORD bs_cs; /* Caught stealing */
} PDBT_BATTER;
typedef
struct {
WORD ps_outs; /* Outs (innings * 3) */
WORD ps_er; /* Earned runs */
WORD ps_bb; /* Walks */
WORD ps_hits; /* Hits */
WORD ps_won; /* Wins */
WORD ps_lost; /* Losses */
WORD ps_saved; /* Saves */
} PDBT_PITCHER;
/* Structure used to pass completely qualified player name */
typedef
struct {
char pn_team[4]; /* 3-letter team abbreviation */
char pn_lname[16]; /* Last name */
char pn_fname[4]; /* First name */
char batter; /* == TRUE if batter */
} PDB_PNAME;
/* structure for specific data associated with each major league */
/* player put in the AVL tree. */
typedef
struct {
char status[5]; /* Current status of player */
char date[MAX_DATE+1]; /* Date status started */
int week; /* week # status started */
BYTE zorch; /* -1 if not available, 0 if free agent */
/* 1 if on rotise team, 2 if hidden */
/* I don't know what to call field!! */
} PDATA;
#endif /* H_BB_PDB */